Skip to content

Conversation

indiakato
Copy link

Assignment Submission: Exquisite React

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

Prompt Response
Define in your own words: What does "state" in React mean? How do we use it? State is an object that can change over time. We use state when we want our data to be able to be changed when running the program. We use it by using setState- you create a const which equals an array of a variable and a function and set that to setState(the default value you want it to start with).
Describe the relationships between the components on a high-level: which components were siblings? Which components were nested within each other? Game was nested in app. RecentSubmission, FinalPoem, and PlayerSubmissionForm were children of game and siblings of each other.
How did this project differ from in-class examples? This project differed with the conditionals.
How was this project similar to in-class examples? This project used forms how we learned them in the lessons. It also used state and had many components working together.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work India, you have a fully functional Exquisite corpse game and you got all the tests to pass. Well done.

{ isSubmitted || poemLines.length < 1 ? '': <RecentSubmission submission={poemLines.length > 0 ? poemLines[poemLines.length - 1] : '' } /> }

<FinalPoem />
{ isSubmitted ? '': <PlayerSubmissionForm fields={FIELDS} index={currentPlayer} sendSubmission={sendSubmission} /> }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just note that the propindex is marked as required in the prop types but you're not sending it, that's why you're getting a warning.

You can adjust the prop types if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants